//
//  FWAttentTypeCell.m
//  BirdLoveSheep
//
//  Created by wwj on 16/3/10.
//  Copyright © 2016年 wwj. All rights reserved.
//

#import "FWAttentTypeCell.h"
#import "FWTypeModel.h"

@interface FWAttentTypeCell ()
@property (weak, nonatomic) IBOutlet UIView *indicator;

@end

@implementation FWAttentTypeCell

- (void)awakeFromNib {
    self.textLabel.font = [UIFont systemFontOfSize:16];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    self.textLabel.textColor = selected?MyColor(219, 21, 26):MyColor(78, 78, 78);
    self.backgroundColor = selected ? MyColor(255, 255, 255) : MyColor(244, 244, 244);
    self.indicator.hidden = !selected;
}

-(void)setModle:(FWTypeModel *)modle{
    _modle = modle;
    self.textLabel.text = modle.name;
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.textLabel.y = 2;
    self.textLabel.height = self.contentView.height - self.textLabel.y * 2;
    
}

@end
